﻿CREATE TABLE [dbo].[IndexFragmentationDetail]
(
	IndexID int IDENTITY(1,1) NOT NULL, 
	TableID int NOT NULL,
	IndexName varchar(100)  NULL,
	IndexType varchar(50) NULL,
	IndexSize varchar(100) NULL,
   Statistics_LastUpdatedDate datetime NULL,
	Fragmentation Varchar(10) NULL,
	Recommendation varchar(60) NULL,
	CONSTRAINT [PK_IndexFragmentationDetails] PRIMARY KEY CLUSTERED
	(
	 [IndexId] ASC
	)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE  [dbo].[IndexFragmentationDetail] WITH CHECK ADD CONSTRAINT [FK_IndexFragmentationDetails]  FOREIGN KEY([TableId])
REFERENCES [dbo].[DatabaseTableDetail] ([TableId])
GO

ALTER TABLE [dbo].[DatabaseTableDetail] CHECK CONSTRAINT [FK_IndexFragmentationDetails]
GO
